/*
 * Copyright (c) 1994-2017, Joyoung Stock CO.LTD.
 * The FWJR Project.
 * All Rights Reserved.
 */

package com.rest.business;

import com.rest.constant.Constant;
import com.rest.response.AreaResponse;
import com.rest.response.AxisResponse;
import com.rest.response.BaseBooleanResponse;
import com.rest.response.BaseJsonResponse;
import com.rest.response.BaseResponse;
import com.rest.response.CheckResponse;
import com.rest.response.CollectClassResponse;
import com.rest.response.CollectStudentResponse;
import com.rest.response.CompareFaceResponse;
import com.rest.response.DeviceResponse;
import com.rest.response.FaceResponse;
import com.rest.response.GradeClassResponse;
import com.rest.response.IaBaseResponse;
import com.rest.response.IsTaskDataResponse;
import com.rest.response.LoginResponse;
import com.rest.response.PicUploadResponse;
import com.rest.response.QRCodeResponse;
import com.rest.response.QualifiedResponse;
import com.rest.response.SchoolNameResponse;
import com.rest.response.SchoolResponse;
import com.rest.response.StudentClassResponse;
import com.rest.response.StudentInfoResponse;
import com.rest.response.StudentOtherResponse;
import com.rest.response.StudentResponse;
import com.rest.response.StudentSEQ;
import com.rest.response.TaskListResponse;
import com.rest.response.TaskWorkerResponse;
import com.rest.response.UserInfoResponse;
import com.rest.response.ValidResponse;
import com.rest.response.VersionResponse;
import com.rest.response.YearResponse;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.Url;

import static com.rest.constant.Constant.METHOD_GET_VERSION;

public interface IRestAPI {


//    @POST(Constant.HOST + Constant.BASE_URL + Constant.METHOD_UPLOAD_PAYMENT_FILE)
//    Observable<PicUploadResponse> uploadFile(@Body RequestBody Body);


    @POST
    Observable<LoginResponse> login(@Url String url, @Body RequestBody Body);

    @POST
    Observable<AreaResponse> getAreaByLevel(@Url String url, @Body RequestBody Body);

    @POST
    Observable<SchoolResponse> getSchool(@Url String url, @Body RequestBody Body);

    @GET
    Observable<StudentResponse> getStudentList(@Url String url, @Query("taskId") String taskId, @Query("classId") String classId, @Query("status") String status, @Query("studentName") String studentName, @Query("pageSize") int pageSize);

    @POST
    Observable<IaBaseResponse> notExamReason(@Url String url, @Body RequestBody Body);

    @GET
    Observable<AxisResponse> isShowOther(@Url String url, @Query("taskId") String taskId);

    @GET
    Observable<StudentInfoResponse> getStudentInfoSL(@Url String url, @Query("studentId") String studentId, @Query("taskId") String taskId);

    @GET
    Observable<StudentInfoResponse> getStudentInfoQG(@Url String url, @Query("studentId") String studentId, @Query("taskId") String taskId);

    @POST
    Observable<StudentOtherResponse> getOtherExamineOptions(@Url String url, @Body RequestBody Body);

    @POST
    Observable<QualifiedResponse> saveStudentFirstInfo(@Url String url, @Body RequestBody Body);

    @POST
    Observable<QualifiedResponse> updateStudentFirstInfo(@Url String url, @Body RequestBody Body);

    @POST
    Observable<QualifiedResponse> saveStudentSecondInfo(@Url String url, @Body RequestBody Body);

    @POST
    Observable<QualifiedResponse> addStudentInfoQt(@Url String url, @Body RequestBody Body);

    @POST
    Observable<QualifiedResponse> editStudentInfoQt(@Url String url, @Body RequestBody Body);

    @POST
    Observable<QualifiedResponse> updateStudentSecondInfo(@Url String url, @Body RequestBody Body);

    @POST
    Observable<BaseResponse> saveStudent(@Url String url, @Body RequestBody Body);

    @POST
    Observable<SchoolNameResponse> getSchoolName(@Url String url, @Body RequestBody Body);

    @POST
    Observable<CheckResponse> getCheck(@Url String url, @Body RequestBody Body);

    @POST
    Observable<StudentClassResponse> getStudentById(@Url String url, @Body RequestBody Body);

    @POST
    Observable<BaseResponse> saveCheck(@Url String url, @Body RequestBody Body);

    @POST
    Observable<IaBaseResponse> getSchoolIdByName(@Url String url, @Body RequestBody Body);

    @GET
    Observable<GradeClassResponse> getGradeClass(@Url String url, @Query("taskId") String taskId, @Query("status") int status, @Query("pageSize") int pageSize);

    @GET
    Observable<TaskListResponse> getTaskList(@Url String url, @Query("status") String status, @Query("taskName") String taskName, @Query("pageNum") int pageNum, @Query("pageSize") int pageSize, @Query("taskId") String taskId, @Query("userId") String userId, @Query("planYear") String planYear, @Query("planType") String planType);

    @POST
    Observable<SchoolResponse> getGrade(@Url String url, @Body RequestBody Body);

    @POST
    Observable<SchoolResponse> getClass(@Url String url, @Body RequestBody Body);

    @POST
    Observable<BaseResponse> isQualified(@Url String url, @Body RequestBody Body);

    @POST
    Observable<TaskWorkerResponse> getTaskWorker(@Url String url, @Body RequestBody Body);

    @GET
    Observable<UserInfoResponse> getUserInfo(@Url String url);

    @POST
    Observable<BaseResponse> updateUserInfo(@Url String url, @Body RequestBody Body);

    @POST
    Observable<BaseResponse> updatePassword(@Url String url, @Body RequestBody Body);

    @GET
    Observable<IsTaskDataResponse> isTask(@Url String url, @Query("taskId") String taskId);

    @POST
    Observable<IsTaskDataResponse> isPerm(@Url String url, @Body RequestBody Body);

    @GET
    Observable<QRCodeResponse> getQRCode(@Url String url, @Query("taskId") String taskId);

    @POST
    Observable<BaseResponse> accept(@Url String url, @Body RequestBody Body);

    @POST
    Observable<CompareFaceResponse> compareFace(@Url String url, @Body RequestBody Body);

    @GET
    Observable<DeviceResponse> getDevices(@Url String url, @Query("deviceType") long deviceType);

    @GET
    Observable<DeviceResponse> getDevicesType(@Url String url);

    @POST
    Observable<BaseResponse> createReview(@Url String url, @Body RequestBody Body);

    @POST
    Observable<BaseResponse> updateTask(@Url String url, @Body RequestBody Body);

    @POST
    Observable<FaceResponse> updateFace(@Url String url, @Body RequestBody Body);

    @POST
    Observable<FaceResponse> resetFace(@Url String url, @Body RequestBody Body);

    @POST
    Observable<FaceResponse> detectFace(@Url String url, @Body RequestBody Body);

    @GET
    Observable<CollectClassResponse> getCollectClassList(@Url String url, @Query("isFinish") String isFinish, @Query("studentName") String studentName, @Query("taskId") String taskId, @Query("pageNum") int pageNum, @Query("pageSize") int pageSize);

    @GET
    Observable<CollectStudentResponse> getCollectStudentList(@Url String url, @Query("isFinish") String isFinish, @Query("classId") String classId, @Query("studentName") String studentName, @Query("taskId") long taskId, @Query("pageNum") int pageNum, @Query("pageSize") int pageSize);

    @GET
    Observable<StudentInfoResponse> getStudentInfo(@Url String url, @Query("taskId") String taskId, @Query("studentId") String studentId);

    @GET
    Observable<BaseBooleanResponse> canOperateByPlanStatus(@Url String url, @Query("orgId") String orgId);

    @GET
    Observable<ValidResponse> validStudent(@Url String url, @Query("prefx") String prefx, @Query("orgId") String orgId, @Query("name") String name, @Query("idcard") String idcard, @Query("sex") String sex, @Query("birth") String birth, @Query("stuType") String stuType, @Query("isAdd") String isAdd, @Query("classId") String classId, @Query("classYear") String classYear);

    @GET
    Observable<IaBaseResponse> getDomainName(@Url String url, @Query("account") String account);

    @GET
    Observable<YearResponse> getPlanYearList(@Url String url);

    @GET
    Observable<VersionResponse> getVersion(@Url String url, @Query("osType") String osType, @Query("type") String type);

    @POST
    Observable<StudentSEQ> getStudentSEQ(@Url String url, @Body RequestBody Body);

    @POST
    Observable<AxisResponse> getEyeVisionByBiology(@Url String url, @Body RequestBody Body);
    @POST
    Observable<QualifiedResponse> addEyeVisionDataByBiology(@Url String url, @Body RequestBody Body);
}

